package com.liu.activiti.service.impl;

import com.liu.activiti.mapper.ActReDeploymentConfigMapper;
import com.liu.activiti.pojo.activiti.ActReDeploymentConfig;
import com.liu.activiti.service.ActReDeploymentConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ActReDeploymentConfigServiceImpl implements ActReDeploymentConfigService {

    @Autowired
    private ActReDeploymentConfigMapper actReDeploymentConfigMapper;

    /**
     * 查询所有记录
     *
     * @return 返回集合，没有返回空List
     */
    public List<ActReDeploymentConfig> listAll(ActReDeploymentConfig actReDeploymentConfig) {
        return actReDeploymentConfigMapper.listAll(actReDeploymentConfig);
    }



    /**
     * 根据主键查询
     *
     * @param id 主键
     * @return 返回记录，没有返回null
     */
    public ActReDeploymentConfig getById(Integer id) {
        return actReDeploymentConfigMapper.getById(id);
    }

    /**
     * 新增，插入所有字段
     *
     * @param actReDeploymentConfig 新增的记录
     * @return 返回影响行数
     */
    public int insert(ActReDeploymentConfig actReDeploymentConfig) {
        return actReDeploymentConfigMapper.insert(actReDeploymentConfig);
    }

    /**
     * 新增，忽略null字段
     *
     * @param actReDeploymentConfig 新增的记录
     * @return 返回影响行数
     */
    public int insertIgnoreNull(ActReDeploymentConfig actReDeploymentConfig) {
        return actReDeploymentConfigMapper.insertIgnoreNull(actReDeploymentConfig);
    }

    /**
     * 修改，修改所有字段
     *
     * @param actReDeploymentConfig 修改的记录
     * @return 返回影响行数
     */
    public int update(ActReDeploymentConfig actReDeploymentConfig) {
        return actReDeploymentConfigMapper.update(actReDeploymentConfig);
    }

    /**
     * 修改，忽略null字段
     *
     * @param actReDeploymentConfig 修改的记录
     * @return 返回影响行数
     */
    public int updateIgnoreNull(ActReDeploymentConfig actReDeploymentConfig) {
        return actReDeploymentConfigMapper.updateIgnoreNull(actReDeploymentConfig);
    }

    /**
     * 删除记录
     *
     * @param actReDeploymentConfig 待删除的记录
     * @return 返回影响行数
     */
    public int delete(ActReDeploymentConfig actReDeploymentConfig) {
        return actReDeploymentConfigMapper.delete(actReDeploymentConfig);
    }

}
